home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
comm
/
htmck110.zip
/
MAKEWPS.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-10-15
|
4KB
|
94 lines
/* ------------------------------------------------------------------------ */
/* Create The HTMLCheck Icon on the Desktop */
/* ------------------------------------+----------------------------------- */
/* History: */
/* -------- */
/* */
/* created: Oct 15 1995 by AJW - */
/* ------------------------------------------------------------------------ */
Version = 'MAKEWPS Version 1.00 Oct 15, 1995'
/* --- make sure RXUTILS are loaded --------------------------------------- */
ADDRESS CMD '@echo off'
CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
CALL SysLoadFuncs
/* --- now here starts the real program ----------------------------------- */
PARSE ARG argstring
argstring = TRANSLATE(STRIP(argstring))
IF substr(argstring,1,1)='?' THEN DO
SAY "+--------------------------------------------------------------------+"
SAY "| MAKEWPS.CMD Version 1.00 |"
SAY "| ------------------------ |"
SAY "| |"
SAY "| Creates a HTML Check Object on the desktop |"
SAY "| |"
SAY "| You *MUST* be in the directory where HTMLCHK.EXE is when |"
SAY "| this command file is run. |"
SAY "| |"
SAY "| SYNTAX: |"
SAY "| MAKEWPS [?] |"
SAY "| |"
SAY "| where: |"
SAY "| |"
SAY "+--------------------------------------------------------------------+"
EXIT 99
END
/* --- get the component name --------------------------------------------- */
MsgON = 1
Sleep = 1
Target = 'ALL'
NewLine = X2C('0D0A')
Success = 1
/* --- set up the component list ------------------------------------------ */
curDir = DIRECTORY()
FolderID = '<WP_DESKTOP>'
i = 0
DO
i = i+1
Obj.0 = i
Obj.i.Class = 'WPProgram'
Obj.i.Check = ''
Obj.i.Title = "HTML Check"
Obj.i.Setup = 'OBJECTID=<HTMLCHK>;EXENAME=' || curDir || '\HTMLCHK.EXE'
Obj.i.ParentID = '<WP_DESKTOP>' /* '<WP_DESKTOP>' */
END
/* --- register and create WPS objects --------------------------- */
IF MsgOn THEN DO
SAY '*******************************************************************************'
SAY '*******************************************************************************'
SAY '***** *****'
SAY '***** Creating the HTML Check Desktop Object *****'
SAY '***** *****'
SAY '*******************************************************************************'
SAY '*******************************************************************************'
END
DO i = 1 TO Obj.0
rc = 1
IF Obj.i.Check <> '' THEN DO
/* check if the prerequisite file for this object exists */
CALL SysFileTree Obj.i.Check, 'file', 'FO'
IF file.0 = 0 THEN ITERATE
END
DO
/* create object */
rc = SysCreateObject(Obj.i.Class, Obj.i.Title, Obj.i.ParentID, Obj.i.Setup, 'ReplaceIfExists');
IF rc <> 1 THEN DO
n = SysSleep(Sleep)
/* retry */
rc = SysCreateObject(Obj.i.Class, Obj.i.Title, Obj.i.ParentID, Obj.i.Setup, 'ReplaceIfExists');
END; ELSE DO
IF MsgON THEN DO
SAY 'Created object:' Obj.i.Title
END
END
END
END
EXIT